﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GoodLoss_Manager.aspx.cs" Inherits="page_GoodLoss_Manager" %>

<%@ Register Assembly="Infragistics2.WebUI.Misc.v7.1, Version=7.1.20071.40, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
    Namespace="Infragistics.WebUI.Misc" TagPrefix="igmisc" %>
<%@ Register Assembly="Infragistics2.WebUI.UltraWebGrid.v7.1, Version=7.1.20071.40, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
    Namespace="Infragistics.WebUI.UltraWebGrid" TagPrefix="igtbl" %>
<%@ Register Assembly="Infragistics2.WebUI.WebDataInput.v7.1, Version=7.1.20071.40, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
    Namespace="Infragistics.WebUI.WebDataInput" TagPrefix="igtxt" %>
<%@ Register Assembly="Infragistics2.WebUI.WebDateChooser.v7.1, Version=7.1.20071.40, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
    Namespace="Infragistics.WebUI.WebSchedule" TagPrefix="igsch" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">    
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../style/main.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" id="igClientScript">
    function uwgMain_AfterRowActivateHandler(gridName, rowId)
    {
	     //选择行当前行
         var goodID = igtbl_getRowById(rowId).getCellFromKey("ID").getValue();
         document.getElementById("hGoodID").value = goodID; 
    }
    
    //验证是否已选中行
    function checkSelectRow()   
    {     
        var goodID = document.getElementById("hGoodID").value;
    
        if(goodID=="")
        {       
	        alert("请选择要进行操作的记录！");
	    
   	        return false;
        }
    } 
    </script>

    <style type="text/css">
        .style1
        {
            height: 26px;
            width: 339px;
        }
    </style>

</head>
<body>
    <form id="form1" runat="server">
    <br />
    <asp:HiddenField ID="hGoodID" runat="server" />
    <center>
        <table style="width: 96%; background-color: #85BDE2; vertical-align: middle;" border="0px"
            cellpadding="0px" cellspacing="1px">
            <tr>
                <td colspan="2">
                    <igmisc:WebPanel ID="wbSearch" runat="server" Width="100%" BackColor="#DAE7F8" Expanded="False">
                        <Header Text="商品损耗管理">
                            <ExpandedAppearance>
                                <Styles Font-Bold="True" Height="30px">
                                </Styles>
                            </ExpandedAppearance>
                        </Header>
                        <Template>
                            <table style="width: 100%;">
                                <tr>
                                    <td style="text-align:right;" valign="middle" class="style1" >
                                        选择产品：&nbsp;                                
                                        <asp:DropDownList ID="ddlGoods" runat="server" Width="117px" Height="22px">
                                        </asp:DropDownList>
                                    </td>
                                    <td style="height: 26px" valign="middle">
                                        产品编号：&nbsp;                                    
                                        <asp:TextBox ID="txtGoodNO" runat="server"></asp:TextBox>
                                    </td>
                                    <td style="width: 250px; height: 26px; text-align:left;" valign="middle">
                                        <asp:Button ID="btnSearch" runat="server" Height="22px" OnClick="btnSearch_Click"
                                            Text="搜索" Width="90px" />
                                    </td>
                                </tr>
                            </table>
                        </Template>
                    </igmisc:WebPanel>
                </td>
            </tr>
            <tr style="background-color: #DAE7F8;">
                <td valign="top">
                    <igtbl:UltraWebGrid ID="uwgMain" runat="server" Width="100%" Style="top: 0px; left: 0px;
                        height: 400px;" Height="100%">
                        <Bands>
                            <igtbl:UltraGridBand>
                                <AddNewRow Visible="NotSet" View="NotSet">
                                </AddNewRow>
                                <Columns>
                                    <igtbl:UltraGridColumn BaseColumnName="ID" Hidden="True" Key="ID">
                                    </igtbl:UltraGridColumn>
                                    <igtbl:UltraGridColumn BaseColumnName="GoodNO" HeaderText="产品编号" Width="10%" Key="GoodNO">
                                        <Header Caption="产品编号">
                                            <RowLayoutColumnInfo OriginX="1" />
                                        </Header>
                                        <Footer>
                                            <RowLayoutColumnInfo OriginX="1" />
                                        </Footer>
                                    </igtbl:UltraGridColumn>
                                    <igtbl:UltraGridColumn BaseColumnName="GoodName_CN" HeaderText="产品名称" Width="20%"
                                        Key="GoodName_CN">
                                        <Header Caption="产品名称">
                                            <RowLayoutColumnInfo OriginX="2" />
                                        </Header>
                                        <Footer>
                                            <RowLayoutColumnInfo OriginX="2" />
                                        </Footer>
                                    </igtbl:UltraGridColumn>
                                    <igtbl:UltraGridColumn BaseColumnName="BrandName_CN" HeaderText="产品品牌" Key="BrandName_CN"
                                        Hidden="true">
                                        <Header Caption="产品品牌">
                                            <RowLayoutColumnInfo OriginX="3" />
                                        </Header>
                                        <Footer>
                                            <RowLayoutColumnInfo OriginX="3" />
                                        </Footer>
                                    </igtbl:UltraGridColumn>
                                    <igtbl:UltraGridColumn BaseColumnName="TypeName" HeaderText="产品类型" Hidden="true"
                                        Key="TypeName">
                                        <Header Caption="产品类型">
                                            <RowLayoutColumnInfo OriginX="4" />
                                        </Header>
                                        <Footer>
                                            <RowLayoutColumnInfo OriginX="4" />
                                        </Footer>
                                    </igtbl:UltraGridColumn>
                                    <igtbl:UltraGridColumn BaseColumnName="GoodNorm" HeaderText="产品规格" Width="10%" Key="GoodNorm">
                                        <Header Caption="产品规格">
                                            <RowLayoutColumnInfo OriginX="5" />
                                        </Header>
                                        <Footer>
                                            <RowLayoutColumnInfo OriginX="5" />
                                        </Footer>
                                    </igtbl:UltraGridColumn>
                                    <igtbl:UltraGridColumn BaseColumnName="Price_Orig" HeaderText="原价" Width="10%" Key="Price_Orig">
                                        <Header Caption="原价">
                                            <RowLayoutColumnInfo OriginX="6" />
                                        </Header>
                                        <Footer>
                                            <RowLayoutColumnInfo OriginX="6" />
                                        </Footer>
                                    </igtbl:UltraGridColumn>
                                    <igtbl:UltraGridColumn BaseColumnName="Price_Vip" HeaderText="VIP价" Width="10%" Key="Price_Vip">
                                        <Header Caption="VIP价">
                                            <RowLayoutColumnInfo OriginX="7" />
                                        </Header>
                                        <Footer>
                                            <RowLayoutColumnInfo OriginX="7" />
                                        </Footer>
                                    </igtbl:UltraGridColumn>
                                    <igtbl:UltraGridColumn BaseColumnName="TransportLossRate" HeaderText="运输损耗比" Width="20%"
                                        Key="TransportLossRate">
                                        <Header Caption="运输损耗比">
                                            <RowLayoutColumnInfo OriginX="8" />
                                        </Header>
                                        <Footer>
                                            <RowLayoutColumnInfo OriginX="8" />
                                        </Footer>
                                    </igtbl:UltraGridColumn>
                                    <igtbl:UltraGridColumn BaseColumnName="SaleLossRate" HeaderText="销售损耗比" Width="20%"
                                        Key="SaleLosstRate">
                                        <Header Caption="销售损耗比">
                                            <RowLayoutColumnInfo OriginX="9" />
                                        </Header>
                                        <Footer>
                                            <RowLayoutColumnInfo OriginX="9" />
                                        </Footer>
                                    </igtbl:UltraGridColumn>
                                </Columns>
                            </igtbl:UltraGridBand>
                        </Bands>
                        <DisplayLayout Version="4.00" SelectTypeRowDefault="Extended" Name="UltraWebGrid1"
                            AllowSortingDefault="OnClient" AllowDeleteDefault="Yes" AllowUpdateDefault="Yes"
                            AllowColSizingDefault="Free" RowHeightDefault="20px" TableLayout="Fixed" ViewType="OutlookGroupBy"
                            RowSelectorsDefault="No" AllowColumnMovingDefault="OnServer" HeaderClickActionDefault="SortMulti"
                            StationaryMargins="Header" BorderCollapseDefault="Separate" StationaryMarginsOutlookGroupBy="True">
                            <FrameStyle BackColor="Window" BorderColor="InactiveCaption" BorderWidth="1px" BorderStyle="Solid"
                                Font-Names="Microsoft Sans Serif" Font-Size="8.25pt" Height="100%" Width="100%">
                            </FrameStyle>
                            <ClientSideEvents AfterRowActivateHandler="uwgMain_AfterRowActivateHandler" />
                            <Pager MinimumPagesForDisplay="2">
                                <Style BackColor="LightGray" BorderWidth="1px" BorderStyle="Solid">
                                    <BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px" > </BorderDetails ></Style>
                            </Pager>
                            <EditCellStyleDefault BorderWidth="0px" BorderStyle="None">
                            </EditCellStyleDefault>
                            <FooterStyleDefault BackColor="LightGray" BorderWidth="1px" BorderStyle="Solid">
                                <BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px">
                                </BorderDetails>
                            </FooterStyleDefault>
                            <HeaderStyleDefault HorizontalAlign="Left" BackColor="LightGray" BorderStyle="Solid">
                                <BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px">
                                </BorderDetails>
                            </HeaderStyleDefault>
                            <RowStyleDefault BackColor="Window" BorderColor="Silver" BorderWidth="1px" BorderStyle="Solid"
                                Font-Names="Microsoft Sans Serif" Font-Size="8.25pt">
                                <Padding Left="3px"></Padding>
                                <BorderDetails ColorLeft="Window" ColorTop="Window"></BorderDetails>
                            </RowStyleDefault>
                            <GroupByRowStyleDefault BackColor="Control" BorderColor="Window">
                            </GroupByRowStyleDefault>
                            <GroupByBox>
                                <Style BackColor="ActiveBorder" BorderColor="Window">
                                    </Style>
                            </GroupByBox>
                            <AddNewBox Hidden="False">
                                <Style BackColor="Window" BorderColor="InactiveCaption" BorderWidth="1px" BorderStyle="Solid">
                                    <BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px" > </BorderDetails ></Style>
                            </AddNewBox>
                            <ActivationObject BorderColor="" BorderWidth="">
                            </ActivationObject>
                            <FilterOptionsDefault>
                                <FilterDropDownStyle CustomRules="overflow:auto;" BackColor="White" BorderColor="Silver"
                                    BorderWidth="1px" BorderStyle="Solid" Font-Names="Verdana,Arial,Helvetica,sans-serif"
                                    Font-Size="11px" Height="300px" Width="200px">
                                    <Padding Left="2px"></Padding>
                                </FilterDropDownStyle>
                                <FilterHighlightRowStyle BackColor="#151C55" ForeColor="White">
                                </FilterHighlightRowStyle>
                                <FilterOperandDropDownStyle CustomRules="overflow:auto;" BackColor="White" BorderColor="Silver"
                                    BorderWidth="1px" BorderStyle="Solid" Font-Names="Verdana,Arial,Helvetica,sans-serif"
                                    Font-Size="11px">
                                    <Padding Left="2px"></Padding>
                                </FilterOperandDropDownStyle>
                            </FilterOptionsDefault>
                        </DisplayLayout>
                    </igtbl:UltraWebGrid>
                </td>
            </tr>
            <tr style="background-color: #DAE7F8;">
                <td align="left">
                    &nbsp;
                    <asp:Button ID="btnSetGoodLoss" runat="server" Text="设置产品损耗比" Width="90px" Height="22px"
                        OnClick="btnSetGoodLoss_Click" OnClientClick="return checkSelectRow()" />
                    &nbsp;<asp:Button ID="btnExcel" runat="server" Text="导出Excel" Width="90px" Height="22px"
                        OnClick="btnExcel_Click" />
                </td>
            </tr>
        </table>
    </center>
    </form>
</body>
</html>
